package org.djj.web;

import javax.annotation.Resource;

import org.djj.bean.User;
import org.djj.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/user")
public class UserController {
	@Resource
	private UserService userService;
	
	@RequestMapping("/view")
	public String goView(){
		return "mytest";
	}
	@RequestMapping("/login")
	public String login(User user){
		System.out.println(user);
		userService.addUser(user);
		return "mytest";
	}
}
